package work.comeback.omo.model.user;

import lombok.Data;

import java.time.LocalDateTime;

@Data
public class UserBean {
    private int id;
    private String username;
    private String password;
    private String role;
    private String avatarUrl;
    private LocalDateTime createdAt;
    private LocalDateTime updatedAt;

    public UserBean() {}

    public UserBean(String username, String password, String role) {
        this.username = username;
        this.password = password;
        this.role = role;
        this.avatarUrl = "/assets/img/person-img/754b570555204b4f8e133b14305038bf.webp";
    }

    public UserBean(String username, String password, String role, String avatarUrl) {
        this(username, password, role);
        this.avatarUrl = avatarUrl;
    }

    public boolean isSamePwd(String in) {
        // is same pwd
        return this.password.equals(in);
    }
}